﻿@model MvcAtletIS.Models.Performances

@{
    ViewBag.Title = "Prihlášky";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editovať prihlášku</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Detaily</legend>

        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.DisciplineListId)
        @Html.HiddenFor(model => model.CompetitorId)

        <div class="editor-label">
            Disciplína
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.DisciplineList.Name)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Birthdate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Birthdate)
            @Html.ValidationMessageFor(model => model.Birthdate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Club)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Club)
            @Html.ValidationMessageFor(model => model.Club)
        </div>

        <div class="editor-label">
            Krajina
        </div>
        <div class="editor-field">
            @Html.DropDownList("CountryId", String.Empty)
            @Html.ValidationMessageFor(model => model.CountryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StartNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartNumber)
            @Html.ValidationMessageFor(model => model.StartNumber)
        </div>

        @Html.HiddenFor(model => model.Lane)
        @Html.HiddenFor(model => model.Code)
        
        <div class="editor-label">
            SB
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SB)
            @Html.ValidationMessageFor(model => model.SB)
        </div>

        <div class="editor-label">
            PB
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PB)
            @Html.ValidationMessageFor(model => model.PB)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SMS)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SMS)
            @Html.ValidationMessageFor(model => model.SMS)
        </div>

        

        @Html.HiddenFor(model => model.Result)
        @Html.HiddenFor(model => model.AdvResult)
        @Html.HiddenFor(model => model.Rank)
        @Html.HiddenFor(model => model.SecondaryRank)
        @Html.HiddenFor(model => model.Reaction)
        @Html.HiddenFor(model => model.Points)

        @Html.HiddenFor(model => model.Sync)
        @Html.HiddenFor(model => model.Active)
        @Html.HiddenFor(model => model.WebId)
        @Html.HiddenFor(model => model.ResultQuality)
        
        <p>
            <input type="submit" value="Uložiť" />
        </p>

    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na editor prihlášok", "Index", new { CompetitionId = Model.DisciplineList.CompetitionId, DisciplineListId = Model.DisciplineListId })
</div>
